package com.huatai.datacenter.controller.fire;

import com.huatai.datacenter.controller.fire.retention.ApiCheck;
import com.huatai.dataservice.fire.feign.FireClient;
import com.huatai.dataservice.fire.firemodel.FireResponseVo;
import com.huatai.dataservice.fire.firemodel.ResponseVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ca/api")
@Api(tags = "综合效能分析", value = "综合效能分析")
@Slf4j
public class ComprehensiveAnalysisController {

	@Autowired
	private FireClient fireClient;

	/**
	 * @return
	 * @describe 获取个人效能指数
	 */
	@GetMapping("/getEffIndexByName")
	@ApiOperation("获取个人效能指数")
	@ApiCheck
	public ResponseVo getEffIndexByName(@RequestParam("name") String name, @RequestParam("dep") String dep) {
		return fireClient.getEffIndexByName(name,dep);
	}

	/**
	 * @return
	 * @describe 获取业务能力指数分布情况
	 */
	@ApiOperation("获取业务能力指数分布情况")
	@GetMapping("/getCapacityIndexByLevel")
	@ApiCheck
	public ResponseVo getCapacityIndexByLevel() {
		return fireClient.getCapacityIndexByLevel();
	}

	@ApiOperation("获取部门效能指数")
	@GetMapping("/getDeptIndexByName")
	@ApiCheck
	public ResponseVo getDeptIndexByName() {
		return fireClient.getDeptIndexByName();
	}

	@ApiOperation("获取工作压力指数分布情况")
	@GetMapping("/getPressureIndexByDep")
	@ApiCheck
	public ResponseVo getPressureIndexByDep() {
		return fireClient.getPressureIndexByDep();
	}

	@ApiOperation("获取响应速度指数分布情况")
	@GetMapping("/getResponseIndexByDep")
	@ApiCheck
	public ResponseVo getResponseIndexByDep() {
		return fireClient.getResponseIndexByDep();
	}


	@ApiOperation("获取时效性风险情况")
	@GetMapping("/getRiskOfResponse")
	@ApiCheck
	public ResponseVo getRiskOfResponse() {
		return fireClient.getRiskOfResponse();
	}

	/**
	 * @author gaowengui
	 * 获取合规性风险情况
	 * @return
	 */
	@ApiOperation("获取合规性风险情况")
	@GetMapping("/getRiskOfLegal")
	@ApiCheck
	public ResponseVo getRiskOfLegal() {
		return fireClient.getRiskOfLegal();
	}

	/**
	 * @author gaowengui
	 * 获取风险评分
	 * @return
	 */
	@ApiOperation("获取风险评分")
	@GetMapping("/getRiskScore")
	@ApiCheck
	public ResponseVo getRiskScore() {
		return fireClient.getRiskScore();
	}

	@ApiOperation("获取问题台帐")
	@GetMapping("/getProblems")
	@ApiCheck
	public ResponseVo getProblems() {
		return fireClient.getProblems();
	}

	@ApiOperation("获取异常数据风险情况")
	@GetMapping("/getRiskOfAbnormal")
	@ApiCheck
	public ResponseVo getRiskOfAbnormal() {
		return fireClient.getRiskOfAbnormal();
	}
}
